package com.xihuanjun.healthcode.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xihuanjun.healthcode.entity.User;
import com.xihuanjun.healthcode.entity.dto.UserDTO;
import com.xihuanjun.healthcode.entity.vo.UserVO;

import java.util.List;

/**
 * (User)表服务接口
 *
 * @author makejava
 * @since 2022-10-25 09:43:20
 */
public interface UserService extends IService<User> {

    /**
     * 用户登录
     * @param loginName
     * @param pwd
     * @return
     */
    UserVO login(String loginName, String pwd);

    /**
     * 修改资料
     * @return
     */
    boolean updateInfo(UserDTO userDTO);

    /**
     * 修改密码
     * @param id
     * @param oldPwd
     * @param newPwd
     * @return
     */
    boolean updatePwd(long id,String oldPwd,String newPwd);

    UserVO get(long id);



    /**
     * 获取除admin之外的所有用户
     * @return
     */
    List<UserVO> subordinate();
}

